package com.eastfair.home.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.home.enumeration.SupervisionItemManagementSupervisionItemEnum;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 监督项管理
 * </p>
 *
 * @author linan
 * @since 2022-11-29
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("hc_supervision_item_management")
@ApiModel(value = "SupervisionItemManagement", description = "监督项管理")
@AllArgsConstructor
public class SupervisionItemManagement extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 是否启用（应用状态）：1是；0否
     */
    @ApiModelProperty(value = "是否启用（应用状态）：1是；0否")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用（应用状态）：1是；0否")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 修改人姓名
     */
    @ApiModelProperty(value = "修改人姓名")
    @Size(max = 100, message = "修改人姓名长度不能超过100")
    @TableField(value = "updated_name", condition = LIKE)
    @Excel(name = "修改人姓名")
    private String updatedName;

    /**
     * 展会ID
     */
    @ApiModelProperty(value = "展会ID")
    @TableField(value = "exhibition_manage_id")
    @Excel(name = "展会ID")
    private Long exhibitionManageId;

    /**
     * 搭建商ID
     */
    @ApiModelProperty(value = "搭建商ID")
    @TableField(value = "builder_id")
    @Excel(name = "搭建商ID")
    private Long builderId;

    /**
     * 搭建商名称
     */
    @ApiModelProperty(value = "搭建商名称")
    @Size(max = 100, message = "搭建商名称长度不能超过100")
    @TableField(value = "builder_name", condition = LIKE)
    @Excel(name = "搭建商名称")
    private String builderName;

    /**
     * 主场ID
     */
    @ApiModelProperty(value = "主场ID")
    @TableField(value = "home_court_id")
    @Excel(name = "主场ID")
    private Long homeCourtId;

    /**
     * 主场名称
     */
    @ApiModelProperty(value = "主场名称")
    @Size(max = 100, message = "主场名称长度不能超过100")
    @TableField(value = "home_court_name", condition = LIKE)
    @Excel(name = "主场名称")
    private String homeCourtName;

    /**
     * 序号
     */
    @ApiModelProperty(value = "序号")
    @TableField(value = "sort")
    @Excel(name = "序号")
    private Integer sort;

    /**
     * 监督项所属 #{ARRANGEMENT:布展展台验收;DISMANTLING:撤展展台验收}
     */
    @ApiModelProperty(value = "监督项所属 #{ARRANGEMENT:布展展台验收;DISMANTLING:撤展展台验收}")
    @TableField(value = "supervision_item")
    @Excel(name = "监督项所属 #{ARRANGEMENT:布展展台验收;DISMANTLING:撤展展台验收}", replace = {"布展展台验收_ARRANGEMENT", "撤展展台验收_DISMANTLING",  "_null"})
    private SupervisionItemManagementSupervisionItemEnum supervisionItem;

    /**
     * 监督项所属名称
     */
    @ApiModelProperty(value = "监督项所属名称")
    @Size(max = 100, message = "监督项所属名称长度不能超过100")
    @TableField(value = "supervision_item_name", condition = LIKE)
    @Excel(name = "监督项所属名称")
    private String supervisionItemName;

    /**
     * 问题数量
     */
    @ApiModelProperty(value = "问题数量")
    @TableField(value = "question_num")
    @Excel(name = "问题数量")
    private Integer questionNum;


    @Builder
    public SupervisionItemManagement(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, Long tenantId, 
                    String updatedName, Long exhibitionManageId, Long builderId, String builderName, Long homeCourtId, String homeCourtName, 
                    Integer sort, SupervisionItemManagementSupervisionItemEnum supervisionItem, String supervisionItemName, Integer questionNum) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.updatedName = updatedName;
        this.exhibitionManageId = exhibitionManageId;
        this.builderId = builderId;
        this.builderName = builderName;
        this.homeCourtId = homeCourtId;
        this.homeCourtName = homeCourtName;
        this.sort = sort;
        this.supervisionItem = supervisionItem;
        this.supervisionItemName = supervisionItemName;
        this.questionNum = questionNum;
    }

}
